package cn.jaye.fabric.domain.model;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

/**
 * @author Jaye
 * @create 2018-06-01 14:29
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class MNsRwsetInfo {
    private String namespace;
    private KVRWSet kvrwSet;
    @Setter
    @Getter
    @NoArgsConstructor
    @AllArgsConstructor
    public static class KVRWSet {
        private List<ReadSet> readSetList;
        private List<WriteSet> writeSetList;
    }

    @Setter
    @Getter
    @AllArgsConstructor
    @NoArgsConstructor
    public static class ReadSet {
        private String key;
        private Version version;
    }

    @Setter
    @Getter
    @AllArgsConstructor
    @NoArgsConstructor
    public static class WriteSet {
        private String key;
        private String value;
    }

    @Getter
    @Setter
    @AllArgsConstructor
    public static class Version {
        private long blockNum;
        private long txNum;
    }

//    public getKVRWSet() {
//        KVRWSet
//    }
}
